package com.jbit.examSystem.controller;

import com.jbit.examSystem.pojo.ExamDetail;
import com.jbit.examSystem.service.ExamDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
@RequestMapping("examDetail")
public class ExamDetailController {
    @Autowired
    private ExamDetailService examDetailService;

    @RequestMapping("findById")
    public String findById(Integer id, Model model){
        List<ExamDetail> examDetails = examDetailService.findByScoreId(id);
        model.addAttribute("examDetails",examDetails);

        return "history/analyze2";
    }
}
